$NG.AllReady(function (page, { useAction, useBeforeClick, useValuesChange, useClick, useUpdateRow, subscribe, useUpdateRows }) {
    const user = $NG.getUser()
    const mstform = $NG.getCmpApi("p_form_pyclsh_m")

    if(page.oType == 'add' || page.oType == 'edit'){
        $NG.updateState((updater)=>{
            updater.data.p_form_pyclsh_m.setProps({
                u_tbnd:{
                    label:String(new Date().getFullYear()),
                    value:String(new Date().getFullYear())
                }
            })
        })
    }

    useBeforeClick(() => {
        const u_tbnd = mstform.getItem("u_tbnd").getValue()
        if (!u_tbnd) {
            $NG.alert("请先选择填报年度！")
            return false
        }
        return true
    }, 'addrow')
    selectTabs()
    function selectTabs() {
        $NG.updateUI((updater) => {
            updater.grid.p_form_pyclsh_d1.setProps({
                hidden: true
            })
        })
    }
})